package com.hspedu.String_;
/*
 *@auther will
 *@version 1.0
 */

public class StringMethod02 {
    public static void main(String[] args) {
        String name="jack";
        int age=20;
        String formatStr = "我的姓名是%s,年龄%d岁";
        String info2 = String.format(formatStr,name,age);
        System.out.println(info2);
    }
}
